MIPS: Support binutils configured with --enable-mips-fix-loongson3-llsc=yes
authorAurelien Jarno <aurelien@aurel32.net>
Sat, 9 Jan 2021 19:06:27 +0000 (20:06 +0100)
committerSalvatore Bonaccorso <carnil@debian.org>
Sat, 6 Feb 2021 08:23:52 +0000 (08:23 +0000)
commit7039bc64bbcca3fc950f32742631db10dba06860
tree1ce81bc85d6fecc61d5844a5ef934a5a552ebf6d
parent753c054d33c9614f2a0351c38c01f8b73236aba9
MIPS: Support binutils configured with --enable-mips-fix-loongson3-llsc=yes

Forwarded: https://lore.kernel.org/linux-mips/20210109193048.478339-1-aurelien@aurel32.net/T/#u

From version 2.35, binutils can be configured with
--enable-mips-fix-loongson3-llsc=yes, which means it defaults to
-mfix-loongson3-llsc. This breaks labels which might then point at the
wrong instruction.

The workaround to explicitly pass -mno-fix-loongson3-llsc has been
added in Linux version 5.1, but is only enabled when building a Loongson
64 kernel. As vendors might use a common toolchain for building Loongson
and non-Loongson kernels, just move that workaround to
arch/mips/Makefile. At the same time update the comments to reflect the
current status.

Cc: stable@vger.kernel.org # 5.1+
Cc: YunQiang Su <syq@debian.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Gbp-Pq: Topic bugfix/mips
Gbp-Pq: Name mips-support-binutils-configured-with-enable-mips-fi.patch
arch/mips/Makefile
arch/mips/loongson64/Platform